We will use the values of left_count and down_count to control how far the ball goes.

  • Go to and drag Set x Speed inside the space_bar() event. Make sure it has a ····.
  • Replace the number in the .set_x_speed() command with left_count.
  • Change the name in front of the command to ball.

Now the ball's x speed is set to the number of times the left key was pressed (the value of left_count).

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)